package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;
import java.util.List;

public class UnsubscribedButtonText implements Sequenceable, Serializable {

    @SerializedName("runs")
    private List<RunsItem> runs;
    public static final Sequenceable.Producer<UnsubscribedButtonText> CREATOR = new Producer<UnsubscribedButtonText>() {
        @Override
        public UnsubscribedButtonText createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            UnsubscribedButtonText unsubscribedButtonText = new UnsubscribedButtonText();
            unsubscribedButtonText.unmarshalling(parcel);
            return unsubscribedButtonText;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeList(this.runs);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.runs = parcel.readSequenceableList(RunsItem.class);
        return true;
    }

    public List<RunsItem> getRuns() {
        return runs;
    }

    public void setRuns(List<RunsItem> runs) {
        this.runs = runs;
    }

    @Override
    public String toString() {
        return "UnsubscribedButtonText{" +
                "runs=" + runs +
                '}';
    }
}
